export default {
    inject: {
        form: {
            from: 'form',
            default: null
        },
        formItem: {
            from: 'formItem',
            default: null
        },
    },
    props: {
        color: {
            type: String,
            default: null,
        },
        disabled: {
            type: Boolean,
            default: null,
        },
        size: {
            type: String,
            default: null,
        },
        sharp: {
            type: Boolean,
            default: null,
        },
    },
    data() {
        return {
            keyForFormItem: Symbol()
        }
    },
    computed: {
        myColor() {
            return this.color ?? this.formItem?.color ?? this.form?.color ?? 'default'
        },
        myDisabled() {
            return this.disabled ?? this.formItem?.disabled ?? this.form?.disabled ?? false
        },
        mySize() {
            return this.size ?? this.formItem?.size ?? this.form?.size ?? 'm'
        },
        mySharp() {
            return this.sharp ?? this.formItem?.sharp ?? this.form?.sharp ?? false
        },
    }
}